import request from '@/utils/request'

// 查询charge列表
export function listCharge(query) {
  return request({
    url: '/system/charge/list',
    method: 'get',
    params: query
  })
}

// 查询12个月的物业费和水电费
export function SumCharge(query) {
  return request({
    url: '/system/charge/sum',
    method: 'get',
    params: query
  })
}


// 查询charge详细
export function getCharge(chargeId) {
  return request({
    url: '/system/charge/' + chargeId,
    method: 'get'
  })
}

// 新增charge
export function addCharge(data) {
  return request({
    url: '/system/charge',
    method: 'post',
    data: data
  })
}

// 修改charge
export function updateCharge(data) {
  return request({
    url: '/system/charge',
    method: 'put',
    data: data
  })
}

// 删除charge
export function delCharge(chargeId) {
  return request({
    url: '/system/charge/' + chargeId,
    method: 'delete'
  })
}
